import request from '@/utils/request'

/**
 * 获取楼宇列表
 * @param { page, pageSize} params
 * @returns
 */
export const getCardListAPI = (params) => request.get('/parking/card/list', { params })
/**
 * 新增月卡
 * @data
 * @returns
 */
export const createCardAPI = (data) => request.post('/parking/card', data)
/**
 * 获取月卡详情
 * @data
 * @returns
 */
export const getCardDetailAPI = (id) => request.get(`/parking/card/detail/${id}`)
// 修改月卡
export const updateCardAPI = (data) => request.put(`parking/card/edit`, data)
/**
 * 删除月卡
 * @param {*} id
 * @returns
 */
export const delCardAPI = (id) => request.delete(`/parking/card/${id}`)
export const delCardListAPI = (idList) => request.delete(`/parking/card/${idList.join(',')}`)
/**
 * 获取规则列表
 * @param { page, pageSize} params
 * @returns
 */
export const getRuleListAPI = (params) => request.get('parking/rule/list', { params })
/**
 * 创建规则
 * @returns
 */
export const createRuleAPI = (data) => request.post('parking/rule', data)
